//
//  LYNavigationBar.m
//  LYPhotos
//
//  Created by 美鑫科技 on 16/5/5.
//  Copyright © 2016年 MorpLCP. All rights reserved.
//

#import "LYNavigationBar.h"

@interface LYNavigationBar ()

@property (nonatomic, strong) UIImageView *imageView;

@end

@implementation LYNavigationBar

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
        self.imageView.clipsToBounds = YES;
        [self addSubview:self.imageView];
    }
    return self;
}

+ (instancetype)navigationBarWithTintColor:(UIColor *)color{
    LYNavigationBar *lyBar = [[LYNavigationBar alloc] initWithFrame:CGRectMake(0, -20, ScreenWidth, 64)];
    lyBar.userInteractionEnabled = NO;
    lyBar.backgroundColor = color;
    return lyBar;
}

- (void)setBackgroundImage:(UIImage *)image{
    self.imageView.image = image;
}

@end
